package com.heima.user.controller.v1;

import com.heima.model.behavior.dtos.UserRelationDto;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.user.service.ApFollowBehaviorService;
import com.heima.user.service.ApUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName: UserBehaviorController
 * Description:
 * date: 2023/8/24 0024 16:47
 *
 * @author zHan
 */
@RestController
@Slf4j
@RequestMapping("/api/v1/user")
@Api(tags = "app端用户行为接口")
public class ApUserBehaviorController {

    @Autowired
    private ApUserService apUserService;

    @Autowired
    private ApFollowBehaviorService apFollowBehaviorService;

    /**
     * 关注
     * @return
     */
    @PostMapping("/user_follow")
    @ApiOperation("关注")
    public ResponseResult userFollow(@RequestBody UserRelationDto dto) {
        return apFollowBehaviorService.userFollow(dto);
    }

}
